Ok(Err(ty)) indicates the constant was fine, but the valtree couldn’t be constructed
because the value contains something of type ty that is not valtree-compatible.
The caller can then show an appropriate error; the query does not have the
necessary context to give good user-facing errors for this case.