Fix regression in ModManager::list()

Fixes #1103

There was two things wrong here

- The i loop would never hit ret[0]. This is resolved by setting
`i=ret.size()` and accessing with `ret[i-1]`.
- The j loop didn't need to be changed, since it's incrementing up. The
`j--` line is only used to re-execute the iteration.