Smartdict fixes

### Changelog
* Fix serious bug that caused `smartdict`s to share state.
* `getKey`: Default argument is now used.