Backport index scripts to 5.2