This particular loophole seems like it was meant to shield homeowners who are moving house. Not for encouraging investment.
Carved out only for real estate investors. I don’t see why it shouldn’t either apply to everyone, or no one.
As I understand it, it's possible to use both rules on the same property, but it takes many years and specific facts.