Fix shadowed variable making invalid available version, fixes #2