Indexed Scripts/Templates: cleanup

Some clean up to remove read/write(sharedString).

See #5921