Changed implementation of locationToAncestor to use ParentLocation's.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>