Issue #2302165 by sun: Fixed loadByProperties() validation + bogus test code.