Better strategy for detecting calculated aes.
Closes #935