This isn't quite as neat as we'd want to make it, because two of the
three call sites still require a closure, but it's still an
improvement.
Note that every instance of MapEndpoints only ever maps to one
topology, which, furthermore, is a core report topology. Hence we can
just parameterise MapEndpoints with that topology, and then the map
functions can return just the node ids.