extract_trees(): Correctly destroy stream list in error path