Fixes to support [] in varnames