Fix array access: one_in returns a bool, but one needs an int here.
Merge remote-tracking branch 'dda/pr/9690' into dda-master

* dda/pr/9690:
  Fix array access: one_in returns a bool, but one needs an int here.