This sounds like a GameMaker cache issue. If importing a big sprite has caused your texture pages to be rearranged it might simply have confused GM's internal knowledge about where a sprite is kept on what sheet. The shader doesn't do *any* calculations as such when it comes to a sprites location or position. It just uses the built in GM functions for finding these things.
Try running the 'clean' option on your project, reloading the IDE, etc. As you discovered, simply adding another sprite was one potential fix.
I'm not discounting the possibility of it being an issue on my code's end but given that it doesn't manually interact with any texture sheet positioning I'm finding it hard to identify what an issue on my end could be.
PS. Apologies for such a late response, I only just caught your comment on one of my videos.