Bug 1080943 - Leak fix for 5994d92115ac copied from Loop's head.js. rs=bustage