Catch when a plan graph case has an invalid structure (e.g not connected)

Signed-off-by: MHesham <mhesham.fcis@gmail.com>