Handles subnetworks (fixes #52)