Thanks Claude Paroz, Riccardo Magliocchetti, and Damian Moore for contributions to the patch.
Thanks jordan at aace.org for the suggestion.