That code is either cut & pasted, or custom-URL-handler'ed, over to the new install, unlocking the same features as an in-app-purchase. (Or maybe there's a bounce through Safari, somehow leveraging its offer-to-launch-or-install functionality to minimize the steps, or through the vendor's own servers keyed by opt-in email address. Lots of possibilities, really.)
With this pseudo-upgrade process, even as convoluted as it is, it all remains inside Apple's system.
I suppose the key question is: does Apple allow promotions that give some people the same effect as in-app purchases, while others still have to make the paid purchase? (I think they do.) I could see Apple objecting if the feature-turn-on is in any way a reward for outside-of-App-Store valuable behavior - that's circumventing Apple's role.
But if it's an extra bonus for an earlier in-App-Store action – the N-1 version purchase – Apple's role hasn't been circumvented. In a way, it's been reinforced. So the same logic driving the prior veto wouldn't apply.