[ticket/12561] Add check to see if "after" column actually exists

If not, just append to the end

PHPBB3-12561