Core Bug related to foreign key referencing not defined for civicrm_entity_tag table

While working on Webtest (WebTest_Contact_MergeContactsTest.testIndividualAdd) I encountered an issue related to core. 
While Merging contacts if the contact consisted of Tags then it was not displayed  to able to merge to another contact.  
On checking i found that there was no referencing for civicrm_entity_tag table for column entity_id and therefore the issue.