Fix a global leak when multiple subnets trusted

fixes #3