This took some time, but I've finally been able to make a reproducible test case. The attached test case fails on HP-UX on Itanium every time, but passes on Linux. As far as I can tell, it is a minimal test case, I cannot remove anything and still have it fail, yet I don't see any wrong API usage in it. The database should be removed before each run.
How is it best to proceed? Should I submit ticket in the bug tracker?