apply: move verify_index_match() higher