i'll definitely check if the existed flag is being incorrectly used there, though it was already there in the data_base::catalog code, so i wonder if there is something in the blockchain code that needs to change instead.. tbh, don't know yet..
I'd say the payment indexing is still a WIP, given that i need to fix that PR and maybe discover new problems when running local tests 🙂