I propose merging this PR in its current state to improve correctness of the overlap check at the expense of doubling the number of SQL "where" conditions.
As Alex suggested in the PR, let's consider removing ADD_TRAILING_SLASH_TO_LOCATION and providing upgrade instructions to rectify old locations stored in the database. After that we can reduce the number of SQL conditions in the overlap SELECT back to its old number. WDYT? Thanks, Dmitri.
