The stretching is indeed the problem, but you got quite far. Actually I was testing this with an image map of some horizontal stripes (repeated in Z), and thought each 'instance' of the map should be rotated by some computation, derived from the angle the warped line makes. Hence my thoughts about blue nodes...
Ideally, a 'rotation by function shader' would be useful (for a lot of stuff), and I've mentioned that before, long time ago.
Thanks for having a go!