let find_script_for_goal ?(loadscripts=true) goal =
  if loadscripts then do_loadscripts () ;
  try Some(snd (Hashtbl.find scriptbase goal))
  with Not_found -> None