Fix for Bug 3055: Links in grids had stopped working.
After the file splitting the links had stopped working because of the
tab id it was no more in scope. Moved it to global scope.