Stop iteration when sub index path is found