better error message for wrong direct definition