Add test to ensure document changeset gets overwritten after invoking lifecycle events