Fixes up the import preprocessor, adds some tests and ensures nested inherits are working as expected.