**Describe the unexpected behaviour**

Union All in combination with joins breaks when upgrading to Clickhouse 20.5.2.7

**How to reproduce**
* Which ClickHouse server version to use: 20.5.2.7
* Which interface to use, if matters: HTTP (but should not matter)
* Non-default settings, if any (none that I am aware of)

Please see the following queries:

```sql
CREATE TABLE tableCommon (
	`key` FixedString(15),
	`value` Nullable(Int8)
) ENGINE = Log();

CREATE TABLE tableTrees (
	`key` FixedString(15),
	`name` Nullable(Int8),
	`name2` Nullable(Int8)
) ENGINE = Log();

CREATE TABLE tableFlowers (
	`key` FixedString(15),
	`name` Nullable(Int8)
) ENGINE = Log()
;

SELECT * FROM (
	SELECT common.key, common.value, trees.name, trees.name2
	FROM (
		SELECT *
		FROM tableCommon
	) as common
	INNER JOIN (
		SELECT *
		FROM tableTrees
	) trees ON (common.key = trees.key)
)
UNION ALL
(
	SELECT common.key, common.value, 
	-- Variant 1
	null as name, null as name2 
	
	-- OR Variant 2
	-- flowers.name, null as name2
	FROM (
		SELECT *
		FROM tableCommon
	) as common
	INNER JOIN (
		SELECT *
		FROM tableFlowers
	) flowers ON (common.key = flowers.key)
)
```

**Expected behavior**
The query should run without an error.

**Error message and/or stacktrace**
The query returns the following error:
```
ClickHouse exception, code: 171, host: my.clickhouse.host, port: 8080; Code: 171, e.displayText() = DB::Exception: Block structure mismatch in  function connect between Converting and Concat stream: different number of columns:

key FixedString(15) FixedString(size = 0), value Nullable(Int8) Nullable(size = 0, Int8(size = 0), UInt8(size = 0)), name Nullable(Int8) Nullable(size = 0, Int8(size = 0), UInt8(size = 0)), name2 Nullable(Int8) Nullable(size = 0, Int8(size = 0), UInt8(size = 0)) (version 20.5.2.7 (official build))
```

**Additional context**
As you can see, there is no data in play at all. The error message is generated just from the raw structure. The first and the second part of the `UNION ALL` work when running them on their own.

Commenting out the last `INNER JOIN` (the one with the alias `flowers`) makes the issue disappear. This would also mean that the `null as name, null as name2` is not the culprit here.

{
    if (!initialized())
        throw Exception("QueryPipeline wasn't initialized.", ErrorCodes::LOGICAL_ERROR);
}
void QueryPipeline::checkInitializedAndNotCompleted()
{
    checkInitialized();
    if (streams.empty())
        throw Exception("QueryPipeline was already completed.", ErrorCodes::LOGICAL_ERROR);
}
void QueryPipeline::checkSource(const ProcessorPtr & source, bool can_have_totals)
{
    if (!source->getInputs().empty())
        throw Exception("Source for query pipeline shouldn't have any input, but " + source->getName() + " has " +
                        toString(source->getInputs().size()) + " inputs.", ErrorCodes::LOGICAL_ERROR);
    if (source->getOutputs().empty())
        throw Exception("Source for query pipeline should have single output, but it doesn't have any",
                ErrorCodes::LOGICAL_ERROR);
    if (!can_have_totals && source->getOutputs().size() != 1)
        throw Exception("Source for query pipeline should have single output, but " + source->getName() + " has " +
                        toString(source->getOutputs().size()) + " outputs.", ErrorCodes::LOGICAL_ERROR);
    if (source->getOutputs().size() > 2)
        throw Exception("Source for query pipeline should have 1 or 2 outputs, but " + source->getName() + " has " +
                        toString(source->getOutputs().size()) + " outputs.", ErrorCodes::LOGICAL_ERROR);
}
void QueryPipeline::init(Pipe pipe)