Index on embedded document field

The problem I have may be related to issue #26.  The problem arises when I have an embedded document field that I want to have an index on.  In my case it is also a compound index, but I don't think this is the issue, it is the embedded nature of the index that is the problem. I not that the issue #26 also has an embedded field indexed ("{'barcode.serial': 1, 'barcode.tme': 1}"). I don't know whether my fix may be a bit of a hack, please take a look.