ffs_reallocblks(): ensure that pref cg is valid
(cherry picked from commit dc37121d3210d08c96a883ebfed780660e7e2b39)