We start a foreground index build through IndexBuildsCoordinator::createIndex() at a couple places (example1, example2). The index builds done through this interface have been ignoring any constraint violations until
SERVER-65024 which fixes the duplicate key issues. We should investigate if we can get rid of this code path.
Otherwise, we should add test coverage for it (e.g. on collections with index constraint violations).