If it makes you feel any better, Painkiller - I've had exactly the same problem, and used exactly the same solution.

I'm quite prepared to believe that I'm coding something badly, but I can't for the life of me work out what.

Rob