[2.2] Rewrite plans with Apply/Optional/Expand to use OptionalExpand instead.

This fix only covers the case where the left-hand-side of Expand is a SingleRow.