As mentioned in the comment below, all of our adjustments to this area of code has made this block a direct continuation of the `else` clause above. Perhaps we should collapse them to make it more obvious (took me a minute to convince myself the WHERE would always be present for the ANDs below).