Improved error messages. Internal types now only processed with nonpublic flag.