Backported stats.facet support from 0.3