Patch suggested by Callum Lerwick <seg@haxxed.com>: "This changes the flag code in...