First fix only worked on the first item. Move the block in the loop and modify the object on wich it removes.
It’s now after the line 82 and looks like this:
$detailPageUrl = $this->getFirstElementValueForTagName($item, 'DetailPageURL');
// Start - Remove ItemLinks node for working imagelinks
$itemlinks = $item->getElementsByTagName('ItemLinks')->item(0);
$itemlinks->parentNode->removeChild($itemlinks);
// End - Remove ItemLinks node for working imagelinks
$imageUrls = array();
This works on all results from a search.