Merge "Extract multi-instance checks into separate helper" into main