Fix a bug in retaining the unnamed register.