Added support for nested extends