Small improvements

- Have the dependency check not in an elseif, so following code may be executed

- Add a DISTINCT to depends on check, so nothing is shown multiple times