Fixed #4937 (false positive: Assert calls a function which may have desired side effects)