This fixes #7909 and fixes #7910.  It now should totally use MongoDB correctly.