[ticket/12230] Add missing last returns to dock block

PHPBB3-12230