Add imports to cater for indirectly referenced classes.