Inline the check_failure() subroutine, which was only used once.