Fix an unused variable warning. Bug #6582