topological_sort: error when there are two packages with the same name but different contents

Comparisons for package collisions in topological sort are being made on a package level instead of by package names, see: #106 

This pull request adds a test which exposes this issue, and I will cherry-pick @jbohren's solution on top.