When iterating over base type indexes, do exactly that, and don't expect
base_type_iterate() to go in correct order. This also fixes compiler
warning about unused pbase parameter from base_type_iterate().