Added handling of optional match to QueryGraphCardinalityModel