Cherrypick merges of 1.6 c4298 and c4299. git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@4314 8db76d5a-ed1c-0410-87a9-c151d255dfc7