Fix an unused variable building without diagnostics.