ClassTransformer: handle final classes #1050
Tests for final classes #1050