SERVER-12993 don't take write lock until a valid insert is detected