Cleanup for the MethodNameDisplayMode.

This cleans up and fixes the breakage introduced by commit
32116e1c60c6d55f21b9c6681fd0102286bddc16.

Change-Id: I1ed39f582e0e9924873fbbfc59cc90a63a42122e
(cherry picked from commit ce889c0e5b422efe7ddfb8f163adb8ba95e8c098)