Attempt to fix compiler warning.

Fixes Bugzilla #1784. (or at least the only part of it that was a real bug.)