Cursor::getSingleResult() should pass false to toArray() so keys are not used.