Bug 1069043 - TypeError: redeclaration of variable mode