Code cleanup in safe_static_init