Fix grouping of statements when laoding data from dumps

This fixes issue #78.
Merge pull request #79 from Wikidata/issue-#78

Fix grouping of statements when laoding data from dumps