Fix wrong checks on subclassing of deprecated classes. closes #581
Merge pull request #584 from dangra/581-deprecated-subclass-fix

Fix wrong checks on subclassing of deprecated classes