Fix renaming using parenthesis

Alternative for #2098

@eMerzh @karlitschek @DeepDiver1975 @Raydiation