Fixing issue where entity body must be unique

Fixes #360

This was a sticky one. It turned out a piece of code was setting _id to
NULL - and MongoDB returns NULL if _id is NULL, as a feature. Good-o.