Better way to protect script - refs BT#7172