Fixed #4775 (Check for assert() with side effects)