Start to fix HQL and SQL query builders to build up large in clauses manually rather than to rely on hibernate to set these properly, due to performance issues with that part of the hibernate api.
Remove old comment
Add a conditional around removing the parameter value in the event that the query does not contain the exact wording expected