diff --git a/compiler2/ttcn3/Ttcnstuff.cc b/compiler2/ttcn3/Ttcnstuff.cc
index d48bdaef07d7c6f7dc2839e14d66a5938b62ef33..8b425bb22ba815ab3c395563ee0a5e7e075ffa47 100644
--- a/compiler2/ttcn3/Ttcnstuff.cc
+++ b/compiler2/ttcn3/Ttcnstuff.cc
@@ -3531,7 +3531,7 @@ namespace Ttcn {
               def1->error("Cannot override final method `%s'",
                 def2->get_fullname().c_str());
             }
-            else if (subclass_loc == NULL && func1->is_identical(func2)) {
+            else if (subclass_loc == NULL && func1->is_identical(func2) != Def_Function_Base::RES_DIFFERS) {
               if (func2->get_visibility() == PUBLIC && func1->get_visibility() != PUBLIC) {
                 def1->error("Public methods can be only overridden by public methods `%s'",
                   id1.get_dispname().c_str());