Merge pull request #2418 from 9rnsr/fix13284

[REG2.066a] Issue 13284 - Cannot match shared classes at receive
Merge pull request #2420 from 9rnsr/2.066

Cherry-picking commits from master to 2.066 branch