The use of dsdb_replace() in dsdb_schema_set_indices_and_attributes() was corrected by ec9b1e881c3eef503d6b4b311594113acf7d47d8 but this did not consider removal of attributes. It also did not assume a global read lock, which we now have.
The impact is that an attribute like @IDXGUID or @INDEXVERSION is not removed despite being detected as needing removal, causing a reindex on every db load.