Without this change it would be possible to create Subtree Limitation with bogus pathString if it ends with existing Location id. We already had all needed data, so it was simple to add this check.

You are right about comparison though, I will fix it.