GC Web Usability theme: Moved definition of swapPNG function so in scope of all calls to the function (fixes #2933)