Infinite distance for non-existant paths should be documented (see first comment). This may make sense here, so I'm not questioning the actual decision, but it should at least be documented.