Use symbol() on state everywhere

Also adds the specific length for generated code where we know the
length of the symbol anyway, so it doesn't have to be calculated. This
also prevents the need for the original method in VM to setup a State
object.