I'm trying to import tasks from CSV file. We're consolidating projects, so the CSV is exported from Jira.
Jira imports the issues correctly, but refuses to add parent/subtask links. This is because it creates all issues as type "Story". Then it complains that "Story" cannot be a sub-task.

I have tried mapping the values of Issue Type field during import, but the mapping is ignored and all the issues are getting imported as Story anyway.

I have also tried using the exact Issue Type names in the CSV file ("Story", "Subtask") and importing it with default mapping, but I see the same error.
I have created a clean test account to try the import, the same problem persists. This is on a next-gen project.