Seems that Roger nailed it. Having had this problem months and months ago, I simply reverted the offending section of code back to the original and it fixed it. Not sure what change exactly set it off, but with all the customizations and messing about I had been doing, it could have been lots of stuff.