Use contexts with correctly adjusted QGCardinalityInput in planWithTail
WIP