bring windows in line with r1001283 (COUCHDB-1197) Thanks to Dave Cottlehuber for the patch. This is a backport of r1160857 from trunk