[runtime] Avoid constructing vtables in a few places during AOT.