Fixed stateful value traits and iterator_to.
Merge branch 'develop'