Hi Marco,
I think you also have to implement some extra code to avoid double stamps in the question bank:
$txt = preg_replace_callback("/<stamp>(.*)<\/stamp>/", "make_unique_stamp", $text);
function make_unique_stamp($matches) { '<stamp>' . make_unique_id_code('translated') . '</stamp>';
}