Closer to full LMS codegen from v4.