Use indexOnSave consistently
Don't index objects after relations deletion, fixes #4527