The hidden grades are now always aggregated together with all other grades. The problem is that users might calculate the value of hidden grades from the totals.
There is a workaround in 1.9, it should be fixed properly in 2.0 (needs db changes)
1/ add field aggregatehidden into grade_items
2/ add field unhideafter into grade_items and grade_grades
3/ add hiding switching logic into regrading
4/ tweak forms and patch the hiding logic