kernel32: Improve flag error handling in FormatMessageA/W.