Make Sparse stats objects spy-safe

Fixes #316