Fix entity duplication once and for all (WIP)

Wait for it!