Remove flags from the prefix before comparing with the received key so