I think you have it figured out. The local TYPE:ID is not in the database, so needs to be added. (option4a)
I just modified that for someone else on the forum, but that is not the change you need.
Try this file
zwa045_0_0.xml (22.5 KB)
with this method
EDIT: I edited the DB for the future