invoices+sqldb: small fixes to address some inconsistencies between KV and native SQL invoice DB implementations
0.18.2