Fixed 'Bug 23512 - Rename refactoring command fails with
InvalidCastException on generic class name after `new` '.