[ticket/12662] Update PR after ticket/12553 merge

Rebasing was a nightmare with all the code moving around between
commits. Hopefully this will merge without a rebase.

PHPBB3-12662