Fix StatementList not reindexing associative arrays

This issue was introduced in #285 (released with 2.4.0) but had no test, unfortunately. It made tests fail in [WikibaseDataModelSerialization](https://github.com/wmde/WikibaseDataModelSerialization/pulls).