Bugfix: Take the correct SQL element from edge
Improved and extended reachability tests