Is there an precedent of a country changing it's residency restrictions? Does the concept of "grandfathering" exist in domain law?
One hedge I might take as a defense against a change in rules is a long term registration, as you may have an "impairment of contract" [google.com] type defense to an attempt to rewrite the rules. It's a less than perfect defense but if all else fails and the defense works you may have a longer window to recoup your investment. Each country has its own body of law so you might want to dig a bit into local contract law. However, given the history of "contracting" I imagine most conutries have some version of a rule that says "Hey, you can't go messing up our contracts by making laws after the fact that voids our contracts (which contracts aren't that offensive to public policy)". In your case you would argue that "I have a contract, entered into in good faith, that was entirely legal and enforceable at the time I agreed to pay $$$ for 10 years of TLD services/access."
Impairment is just one quick idea that comes to mind. I'm certain there's other defenses or strategies for addressing a ex post facto rewriting of the rules that touch on your registration contract. Contract tends to be pretty hearty stuff since it's the basis of commece and (almost) everybody loves commerce.
You also might want to keep mum about your success as to not invite any local jealousies.
Lastly, "come the day", you might qualify simply by establishing a local business presence. That is, a business may be "resident" in the country under local rules even though a controlling interest is held by a non-resident. The policy supporting the fiction is, basically, "as long as we're collecting taxes on their revenue . . . who cares?".
Lastly lastly, you might seek a consult with local counsel for a "hypothetical business".