Improved error messages for private and protected member access