Fixed handling of package declarations in interface mode