Additions to geometry_graph

Problem with autoinitialization of closure variable.
Tests not passing.
Added an assert to demonstrate VM bug

Although it invalidates the algorithm. This change needs to be
reverted!!!