You gave him the option to post an answer; that was nice of you. He obviously declined (or was unable to respond within a reasonable amount of time), so you should post an answer of your own.
I can't speak to what's in his mind, but I can say what would be in mine, since I do the same thing relatively often. The person who asks the question and solves the problem is in a better position to post a quality answer than I am. I just had an idea and pointed your thinking in the right direction. If I knew enough to post a good answer (or had the time to do so), I would have already done it. You, however, have followed my lead, solved the problem, and have an even better understanding of the situation. Perfect for writing a good answer. Everyone wins.
Don't feel compelled to mark the answer you submit as community wiki in order to surrender the reputation gained, or anything like that. Not only is that an abuse of the community wiki feature, but it simply isn't necessary. You have earned the reputation! You did the research/debugging, thought about the issue, solved the problem, and wrote the answer. If others find that answer helpful, you deserve the upvotes they give it.
It would, however, be appropriate to give Graham some credit for pointing you in the right direction. The top of your answer might mention his comment, the relevant link(s), and his name. You know, the standard attribution rules. I would be more than content with that myself.