Thanks Jon Dufresne for the report and Tim Graham for the review. Backport of 82175ead723f8fa3f9271fbd4b24275097029aab from master
Thanks Mariusz Felisiak for review and Oracle assistance. Thanks Tim Graham for review and writing docs.