[jit] Fix a class initialization race which happens if a class initializer initializes a got slot before it finishes running. Fixes #23242.