There was one more location where the cleanup script could generate an error. This should fully resolve the error, along with https://github.com/actualbudget/actual/pull/1084.