Bug 877728 - Use a local variable instead of a ref to store a temporary. r=Ms2ger