Better error message for hidden definitions. Fixes #336.