I tried something bit different which seems cleaner to me - use the pstate->r_table instead of ad-hock locally made up range table and fill that using standard addRangeTableEntryForRelation. Both in tablesync and in DoCopy instead of the old coding.
Patch works fine. However, I don't see any documentation about supporting different schemas for logical replication. Is it an oversight?