I did need to use your fix after all. The xcaxhe work around is incomplete because pages other than the gallery use the gallery, eg. User profile and the menu. These were disappearing as unpredictably as before on one of my sites. Your fix above seems to have done the trick though. Thanks.