hasMethod composite call fix:
call to child definition only if it has given class
Merge branch 'hotfix/3886'

Close #3886
Merge pull request #3888 from kirillsablin/master

DefinitionList hasMethod fix
Merge branch 'hotfix/3888' into develop

Forward port #3888