I've managed to implement it and it seems to be working perfectly.
For sake of completion, here's the code I used. (It goes into modules/core/classes/GalleryItem.class, line 436)
if ($isNew) {
list ($ret, $parents) = GalleryCoreApi::fetchParents($this);
if ($ret) {
return $ret->wrap(__FILE__, __LINE__);
}
foreach ($parents as $item) {
$gallery->addShutdownAction(array('GalleryCoreApi',
'updateModificationTimestamp'), array($item->getId()));
}
}
Thanks again for your help.
EDIT: 27/Jan - Updated code to adapt to G2 coding style. That should make this hack be able to survive more API changes. 