More work on fixing some issues with the logic that picks between versions of distributions in the environment vs the package index