Added workaround for JVM bug JDK-7104012