Pattern synonym names need to be in scope before renaming bindings (#9889)