Fix boolean check fail from a8ec134c2c34482bedf08c6d022cbbc5ca3fa7bc
Process remove ops first, fixes #2874
Fix integration tests