This fixes #8306.  I had to put in a check for createIndex.  It is not currently in the version of mongodb I am using.