Testcase for a habtm bug in mongoid