I just looked this up and you're right. If you're subject to the expatriate tax then you're automatically disqualified from the exemption. From my reading, it seems like there is a small loophole. You can sell a foreign property if you move back to the U.S. and meet all the other primary residence conditions.