Query builder screws up with self referenced tables

Wappler Version : 7.1.2
Operating System : Win 11
Server Model: node
Database Type: MySql
Hosting Type: VPS

Expected behavior

What do you think should happen?

Self aliased tables should setup correctly

Actual behavior

All table references are changed form primary table to child referenced table

I start with a table like this:

image

I add the table to a query

I then add the same table again under an alias "children" and link children.parent_id to book.Id

image

When i save all references to "book" are changed to "children" (except subtables)

Looking at the json file, it looks like the original "book" query is simply re-aliased to "children" rather than a new table instance added as "children"