Add missing import for ReferenceTreeLoaderError.
Fix exception name in reference tree loader.
Add test case for loading malformed interface definition.