[ticket/12174] Don't update the flag for a post without attachment

PHPBB3-12174