Thank Daniel for you quick fix.
I backported the commit to my 5.2 branch because I cannot use the master one. I deployed it on the affected system and at the moment we didn't noticed any new crash.
I'll leave the system running for a couple of days and I'll keep you updated about the status.