CLN: avoid Unboundlocal error in tools/merge/_get_concatenaged_data (GH3833)

closes #3833