imported patch special-extras
Updated dependency finding to use extras rather than a 'tests' flag.