Cherry-picking commits from master to 2.066 branch (for beta3)

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