Tally Elements/UniqueElements tweaks to compile on gcc