[ticket/12710] Do not try to match the uniqueness in the query

PHPBB3-12710