WELD-1751

Based on Davis's ideas from WELD-1751 and Stuart's PR (https://github.com/weld/core/pull/670)
Small possible optimization: you could check the existing domain to see if it already implies ACCESS_DECLARED_MEMBERS_PERMISSION.  If it does, you can just skip all this work.