Make ontology reload thread-safe