Improve 869466278b55 for non virtual packages.

If dependency is installed but does not satisfy the requirements, mark it
as an update and not install. The commit 869466278b55 changed the logic
for virtual and non virtual packages.