Fixed a major bug in how complex join conditions are escaped while also fixing a few bugs in the escapeIdentifiers function.