Make flash messages module more version-agnostic

If there are more flash message types in upstream, let me know...