Make sure CompositeStream is closed properly, refs #195