Regioselectivity in the formation of an imidazo[1,2-a]pyrimidine In the heterocycle synthesis below (taken from Org. Process Res. Dev. 2006, 10 (3), 398–402), a 5,6-fused heterocycle (an imidazo[1,2-a]pyrimidine) is formed by treating 2-amino-4-(trifluoromethyl)pyrimidine with the diethyl acetal of bromoacetaldehyde, with the cited paper claiming to get a 25:1 selectivity for 5 (minimal amounts of 5a also produced were able to be easily removed). 


  
  
  Ref: Org. Process Res. Dev. 2006, 10 (3), 398–402.


There are (as ever with heterocycle syntheses) a few different mechanisms one could draw, however, no matter which way round one draws the mechanism, the major product is always the one that arises from what appears to be the less favoured intermediates.

By less favoured intermediates, what I mean to say is that to arrive at the major product, necessarily a cation ends up closer to the electron withdrawing trifluoromethyl group than it would do if the minor product was formed. 

Given that all the steps are essentially reversible, is the product distribution arising from a purely ground state thermodynamic preference for 5 over 5a, or is there a mechanism that I'm completely neglecting (sorry for the lack of pictures, I'm not able to ChemDraw right now).
I propose the route in the following scheme. I don’t see any unfavourable intermediates. In short, the first step would be formation of a Schiff base with the extracyclic amino group and the aldehyde. This — in one of many orientations as shown below — places the bromide nicely so that one of the pyrimidine nitrogens can attack it nucleophilicly. Upon displacement, an intermediate nitrogen-centred cation is generated; loss of a proton and switching of electrons regenerates aromaticity and gives the desired product.


Scheme 1: Proposed reaction scheme. The attacking nitrogen $\mathrm{sp^2}$ orbital in step 2 is drawn explicitly.

We can draw structures of the Schiff base intermediate that would allow either of the pyrimidine nitrogens to attack. However, the top one experiences a stronger $-I$ effect by the neighbouring $\ce{CF3}$ group hence its electron density and nucleophilicity should be reduced. The para-nitrogen does not experience this inductive effect since it greatly weakens with greater distance.

The ortho-nitrogen’s lone pair is indeed affected since inductive effects affect both &#x3c3; and &#x3c0; bonds while mesomeric effects mainly affect &#x3c0; electrons only.