Emit better error messages for unresolvable dependency trees.
Fix usage of the selections file (was completely ignored) and improve diagnostic output.