Better checks for inaccessible member used via dynamic proxy. Fixes #14762