Merge pull request #3742 from 9rnsr/2.066

Cherry-picking commits from master to 2.066 branch (for beta3)
Merge pull request #3731 from 9rnsr/fix13074

Issue 13074 - Old opCmp requirement for AA keys should be detected