[rules-users] ClassCastException when using an accumulate function on a locally declared type