I worry about floating point rounding errors here, but I can't actually produce any examples of exact aspect ratio that wouldn't match.  It seems to me that allowing aspect ratios that are a very close match (say within 5%) might be a good idea.