Workaround against MongoDB BSON document size limit

	This workaround is temporary and it's meant just to avoid crashes.
	The plan is to start using MongoDB GridFS in the next future. After
	that this patch will be removed.