Stats: Indices stats ignoring "groups" and "types"

The "groups" and "types" parameters to indices stats were being set too
early, so could end up being cleared.