Fix a number of local register allocator issues: PR1609.