End-to-end path support with loops

LoopPipe.getCurrentPath() now returns the end-to-end path instead of
truncating where the loop began.