Classes should be removed only when adaptive is specified
merged branch mvrhov/patch-1 (PR #4975)

This PR was merged into the master branch.

Discussion
----------

Classes should be removed only when adaptive is specified

This fixes a regression introduced in refactoring done on July 3rd.

Commits
-------

92fbb0b Classes should be removed only when adaptive is specified