Thanks for your reply Terry.
I've added the line above to my test page (link above) and it doesn't seem to have done the trick.
It does mean I get the popup error "Message 173" more frequently, so I think it's helped something along the way.
Is there anything else I can do?