Revert "Revert "Fix issue with incorrect controllerdef access check," because it made"

    This reverts commit 86da15d9d4863c6070980763008c66cb7864d124.

- Fixed issue with empty controllerdef case
Merging origin/dchasman/master-pending-unrevertgetControllerDefFix into master