Handle resubmitted messages correctly