SERVER-12061 fix assert code