Fix #8758 (graduated classes on expression broken)