Optimize public_trial upgrade steps so we only rebuild indexes once.
Fix mail upgrade steps so they can safely be run a second time.

Also deal with the broken tuple schema when setting defaults.