this will silently remove a trailing slash. is this the right thing to do? or should we explicitly check for `$ancestorPath === '/'` ? this is a real question, what do you think @lsmith77 ?
the problem is being lax can be convenient but can make for hard to debug errors if somebody tries to do something that did not make sense. if we do the strict check, we probably would want to throw an exception on a trailing / of non-root-path.