diff --git a/lib/deep_cover/node/mixin/has_child.rb b/lib/deep_cover/node/mixin/has_child.rb
index <HASH>..<HASH> 100644
--- a/lib/deep_cover/node/mixin/has_child.rb
+++ b/lib/deep_cover/node/mixin/has_child.rb
@@ -73,8 +73,8 @@ module DeepCover
           if remap.is_a? Hash
             type_map = remap
             remap = -> (child) do
-              klass = type_map[child.class]
-              klass ||= type_map[child.type] if child.respond_to? :type
+              klass = type_map[child.type] if child.respond_to? :type
+              klass ||= type_map[child.class]
               klass
             end
             types.concat(type_map.values).uniq!
Remap based on type first, then on Class