Fix merge_test failure due to incorrect assert behavior in the release mode.