Workaround graph issue.

This catches the case that there is no node in the graph with the currently selected path. Note that this should not happen anyways.
Merge remote-tracking branch 'origin/master'