Fix unused-argument optimization bug