Patch from Josh from bug #44403 - Further support for unusual, but valid, arguments to the Mid function