check matching navigation items recursively