[ticket/12265] Fix modulo logic.

PHPBB3-12265