Support for derived streams (part 2)

Part two of the prematurely merged pull request.