 <p>Nevermind, I figured it out. It was very simple, I just needed to delete the same value from the array that I was deleting from the database - it was always working on the same object so that variable never changed and each subsequent call once again saw previously deleted messages as valid messages.</p>