[GHC] #15395: Make StaticPtr (more) robust to code changes and recompilation