Fixes bug where tenant-part of a script would be duplicated in scriptname