This issue is easy to reproduce using the codebase of the current snapshot, so I don't attach any code or screenshot.
I believe it is a bug, since the toggle for variables and field metrics should not affect the results for class-level metrics.
Will make PRs if I can fix it.