do not call functions with side-effects inside assert (cherry picked from commit...