trivial simplification
First fix for #622 that seems to work (after minor fixes to test also; id class MUST implement #equals() and #hashCode()!)
Will see if polymorphic case would support, and if not, what is needed to support it.