@Kingimagination,
How recent an ex is this?
A week? Less than a year? Then yeah, you were being kinda insensitive.
Ten years? Five? Two? Then the Statute of Limitations has run.
Hell, I'm in contact with a guy I dated a good 38 years ago (he is currently divorced). If a friend wanted to flirt with him, I wouldn't just encourage it. I'd set it up.