PROV-856 Fix transaction handling for dry-run and to not exhaust connection pool