Optimize locals renaming