issue #5837: Fix problem where dissallow mismatched versions logic was reversed. Also touch up cosmetics.