SI-8738  Regression in range equality

Missed the case of comparing a non-empty range to an empty one.  Fixed by checking nonEmpty/isEmpty on other collection.

Added a test to verify the behavior.
Merge pull request #3887 from Ichoran/issue/8738

SI-8738  Regression in range equality