Fixed bug #12154: Improve API of flashmessages