This check is unnecessary. HasAttrString has already been checked above.

Instead of if (!override_obj) here it would be better to do if (override_obj) break; after the loop below