Fix bug with ModelTree#isThisComponentADuplicate

I had mistakenly been checking the portId instead of the componentId,
so this method always returned false.