Fix automatic indexing on model changes