only iterate over the versions once and use `groupBy` to sort the dependencies into the version mapping
Merge pull request #9 from jochenberger/optimize-version-mapping

Slight optimization for the version map gathering