if we delete the last visible post that has an attachment, we should remove the flag.