Fixes nested ability conditions in issue #859