(fix) Handling networks with gereric IDs instead of names.

As discussed in #860 and #872.