Added test for #1662
Moved loop tests using Java keywords to the proper quoting tests (#1658)
Extended tests for #1658 and #1662
Fixed #1662 quoting-related bug (things missed when fixing #1658)
Fixed tests for #1662