BUG/INT: Internal tests for patching __finalize__ / bug in merge not finalizing (GH6923)

closes #6923