SERVER-8008 Moved checks for sort pattern to early and performed them only once per update.
SERVER-8008 Fixed uassert numbers.