Special:PageMigration may import
== header ==,{{template}} text
instead of
== header == {{template}} text
Note the first new line character has been replaced with a comma. I am not sure about the minimal test case, but this seems related to headings (this seems to doesn’t happen when heading is followed by two successive new lines).
You can try on Meta with Complete list of Wikimedia projects/sv page.
I am pretty sure this is a recent regression.