Fix regression from r190382.

Make sure we perform the correct "referenced-but-not-used" check for
static member constants.

Fixes bug reported on cfe-commits by Alexey Samsonov.