This seems to be a bug in the database cache!!

When assigning ID's to histories, the Indexer attempts to find prior history with guessLastFileHistory. This will only return FileHistories which describe a similar type of file. If none is found a new ID is assigned. Therefore in the testcase, the added Folder should have a different ID, this makes the test pass. (And removing a TODO which should have been in the last pull request).