Fixed false positive when noreturn function is defined (#5601, second attempt)