Workaround: assigning temporary negative IDs fixes the issue