remove precompile mutation step from staticdata (#48309)
Make sure things are properly ordered here, so that when serializing,
nothing is mutating the system at the same time.
Fix #48047
(cherry picked from commit 87b8896fa36d37e988867f404a9b1caebdc98dda)