Support scoped collections. Fixes #13