crush: backport newer get_full_location

The old implematnion could get stuck in a loop in some cases; see
bug #7648