use const variable access for [set_variable] to_variable

we need const access to make '.length' work