Dev kissed RJ (in fact, she kissed him) while they were drinking together, and then he insisted they stop. Not even in the same universe, let alone on the same plane.
As to Dev sleeping with Ivy, I don't see any excuse for that. However, I don't know the circumstances, or if it even happened. Wouldn't be the first dream sequence I've seen. Still, a one night stand is not even close to knowingly rekindling an old affair when you have a husband and a teenage son. Julia didn't just succumb in the heat of the moment. She sought it out with malice aforethought.