Remove premature optimisation causing problems in Firefox
Fix problem in free variable calculation