Use mapping of nodes by position rather than finding in sets
Use mapping of nodes by position rather than finding in sets

This solves a segfault we were getting due to invalid references. The find wasn't working when dropping nodes. If we actually use a map here then we can simply access the entry at the specified position and it works.

Contributes to issue CURA-4523.

Ultimaker/CuraEngine,alephobjects/CuraEngine,alephobjects/CuraEngine,alephobjects/CuraEngine,ROBO3D/CuraEngine,Ultimaker/CuraEngine,ROBO3D/CuraEngine,ROBO3D/CuraEngine