Fix EZP-22055: A partial pathString loads a REST location/group

/content/locations/1/2 or /content/locations/124/4/54/2 would return
location 2. Anything but the actual path string will error out now.

Also applies to /user/groups.