Query fails after update to 2.4.0

I updated from 2.0 to 2.4 and the following query fails (in Grafana):

import "math"

from(bucket: "m700")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_field"] != "zref")
  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
  |> drop(columns: ["_start", "_stop"])
  |> pivot(
    columnKey: ["_field"],
    valueColumn: "_value"
  |> map(fn: (r) => if r._measurement == "ph" then (
    { r with
      orp: r.orp - 0.198 * (r.temperature - 25.0) + math.sqrt(x: 50301.0-297.0*r.temperature)
  ) else r )


recursive types not supported P != {A with orp: float}

It worked fine before, and supplying a dummy value for orp is undesirable. How can I fix this?

Hi @KaneTW,
If I am not mistaken this looks to be a bug on our end. Let me confirm with @Anaisdg. If so we will log a git issue for it.

Thanks for pointing it out.