A small optimization in _loadToolScript, making it more efficient