Add MergeData middleware. Useful for WTForms.