Fix missing assertion in plan comparison code