Update check_known_variables logic.