UAR-661: Modifying Replacing multiple calls to getUpdatedTimestamp with local var when sorting protocol attachments