Unused member warning doesn't highlight whole definition anymore

Previously, the whole definition is highlighted by an unused member
warning, which was very annoying. The new behavior only highlights their
names.

The fix will also affect any other error message that highlights a whole
expression or definition.

No tests included because I have no idea on how to test the behavior.
Only some manual tests were done:

    class MyClass {
      private def hello(i: Int) = { // <--
        println(i)
        i
      }

      private val abc = { // <--
        0
      }

      def ghi = {
        val abc = { // <--
          0
        }
        5
      }

      private class Xros { // <--
        val xxx = 0
      }
    }

Fixes #1001983