OK, I seem to get different results with your code and the images than you have posted. In my case the textures simply switch places.
What do you mean by scaling breaking it? I understand it being an example but, from the images posted, it seems to work for you and not for me.
What do you mean by scaling breaking it? I understand it being an example but, from the images posted, it seems to work for you and not for me.