Help wanted with an EXCEPTION_ACCESS_VIOLATION

I have been struggling for many months with a bug whose error message starts like this:

Exception: EXCEPTION_ACCESS_VIOLATION at 0x2b33f08d 
-- fmpz_set at /workspace/srcdir/flint2/fmpz\set.c:23

I have reported the bug to the Nemo project, but the developers there have not found a solution either.

Of course, the bug can be in many places, in my code (where it has appeared in various contexts), in the Nemo library, but it can also be a Julia bug. I did not succeed in creating a minimal example, as the error seems also to depend on surrounding conditions (perhaps even on the OS).

A detailed description with links to the code is on GitHub.

I am grateful for any help finding the cause of this error.
Please reply on GitHub as this is not of general interest here.

Thanks