script: fix crash on "/script update" if a script detail is displayed in buffer (closes #177)