remove unused variable redefinition [Fixes #3072]