handle unversioned dependencies on multiply versioned modules correctly

fixes RHBZ#982798