Here's my question: http://stackoverflow.com/q/4229647/262056
As you can see I've updated the question with details about the deleted answer. I'm pretty sure that the answerer deleted the answer thinking it was incorrect because I told them in the comments that it wasn't working properly.
I'd like to give this person credit for the answer, even if their answer didn't contain the missing condition (I bet it did, and I just missed it). If it wasn't for their guidance I never would have solved my problem.
What's the proper protocol in this situation? I suppose what I've done is best, but maybe there is another avenue I'm not aware of?