Patch attached.
Created attachment 20898 [details] Patch
This has been fixed in trunk and proposed for 6.0.x
This has been fixed in svn and will be included in 6.0.16 onwards.