Add index to stack trace in pretty page template