Workaround for JDK Bug 7188838, fixes #1