fix a bug in redeclare involve short var declaration

I found this bug at work.