Added a check so new appdomains can avoid an extra cross-appdomain call when caching their proxy.