Random participant added when adding line item
When adding a line item to a contribution that contains a participant line item, the new line item uses "civicrm_participant" as the entity type but the contribution ID as the entity ID, resulting in a random participant being added to the contribution.
In addEntity() in Util.php where the entity type is set as "civicrm_participant" the correct ID is assigned to $entityId, but $entityID (difference in capitalisation) is what the function returns.
Even when the correct participant ID is used it results in the same participant being listed twice under "associated participants" which isn't ideal...