YOMO-7159 allow slashes in short path or prefix

What about `and not (key = 'prefix' and allow_slashes_in_prefix)` instead?