Hi Zsolt,
Thanks for working on this.
v1 looks good to me. I can reproduce it on master and the patch
fixes it.
I think reinitialize is the right place for the fix. Before 19,
phs_startblock did not depend on the query, so keeping it across
rescans was fine.
Thanks,
Shihao