Bug 976536 - Fix JSFunction::existingScript returning NULL in some cases. r=till, a=sledru