Fixed #4837 (False positive: Assert statement calls a function which may have desired side effects (local variable))