Fix bug LT-14985 Part Whole merge problem

* Add test to show issue in Part/Whole relation
* Fixed issues where the Part/Whole relation could get confused

Change-Id: I107f52c89535177d68f579e25d9f04654217beb5