…buring the test runs.
The original implementation used a list comprehension to account for the applications to be stopped,
but the code didn't work as expected leaving applications still running. These applications would later be
killed by the kill_extras function resulting in errors. This fix computes the applications that
must be stopped/unloaded using a digraph of dependencies.