fix domain-server handling of multiple instance agent scripts