What we had to do to make it work is to manually change the association names for all entities with a reference set by adding 'Set' to the middlename (to SapName_HeaderSet_Item) .
If you are experiencing similar issues and want to have this fixed automatically, please upvote the idea below:
https://forum.mendix.com/link/ideas/2937