fix refactoring from #836

The refactor in #836 is broken -- `scores` is undefined in the `debug_dump_probabilities` function.  This fixes it.

/cc @tnm