Add a test, and fix passing the reference to streamy.Root in subresources (which was a bug caught by said tests)