Allow IObjs to be cmp. to non IObjs when merging.

Fixes #1110.
Add tests for IObj vs. non IObjs merging.