Fix for rare issue in static initialization order