Optimize area containment information by using a query with fewer CTEs.
Merge branch 'area-containment-optimize' into beta

* area-containment-optimize:
  Optimize area containment information by using a query with fewer CTEs.