We are unable to verify the claim in the initial report that
this problem exists in a release version of SQLite.  The POC
script runs to completion and generates the correct answer on
SQLite versions 3.31.0 and 3.31.1.  The POC script uses features
(generated columns) that were unavailable in earlier versions
of SQLite.

The POC does fail in the latest (unreleased) trunk version of
SQLite.  The error seems to have been was introduced less than 24 hours
ago by check-in [a9bb71ba708ba722].