This was a regression introduced by 7deeabc7c7
to address CVE-2019-14234.
Thanks Tim Kleinschmidt for the report and Mariusz for the tests.
Backport of 6c3dfba892 from master
SQLite doesn't repoint table aliases in partial index conditions on table
rename which breaks the documented table alteration procedure.
Thanks Pēteris Caune for the report.
Backport of 34decdebf1 from master