core: Fix variable "has_whined" value bug