You are right, when calling `pop` on an empty array, we don't need to emit `remove`.