Sorry that didn't do it! (I duplicated the error in IE7, and that fix seemed to work for IE7).
Could you try placing the include code on a fresh (blank) page to check that the gallery set-up works OK on its own? This might narrow down the fault-finding options a bit.
The smart guys will be back tomorrow if this still fails.