Bugfix in lattice assignment operator

Fix some godawful memory management in assignment operator for lattices
Fix same error in graph assignment operator