Process remove ops first, fixes #2874
Fix integration tests