make order of vars deterministic
unified handling of ForStmt and RangeStmt