Update to fix case-sensitivity issues

Was mangling IDs when included in where clauses in outer or inner queries, by converting to lower case. Now isn't, that gets preserver, and things that need to be converted to lower case have that done explicitly instead of a "lowercase all the things" approach