(educating me, not critiquing your code)
Is the init. prefix in $(init.$(states)) a work-around for $($(states)) not working ?
Given that init. is the namespace we're in, it appears redundant, otherwise ...