bug updates name index when an object has been deleted
(cherry picked from commit 4c298351d7d7d3b99cb44d3b110ef9f020444e16)