After struggling with my lustful thoughts all day, I finally realized that I needed to take some sort of concrete action to deal with the situation. I prayed about it, and decided that I should call the man whose remark started all this.
I felt incredibly awkward admitting to this man that his joke had caused me to lust (after him, no less), but to my relief, he understood. He even apologized. And I did something absolutely necessary and set a boundary for our conversations: I told him that if he wouldn't do it with someone he isn't married to, then he shouldn't mention it to me in conversation, even when just joking around.
And then one of my female friends offered me this bit of wisdom: male-female friendships always need boundaries, but you usually don't know what boundaries you need to set until one of you accidentally crosses the line.
I'm glad I found the line and that my friend is willing to abide by the newly-set boundary!