And so it is.
The global static pod gets destroyed before the unregister is called, hence the nil pointer. Why this happens is unknown to me, but supposedly it could be easily solved by checking the ptr before trying to access it.