warn on bad exports, fixes #2338