Optimize Performance for ShortVarDeclaration and VarOrConstResovler

The improvement is not very big, but it is sensible.