Please review this fix. There is a long description in the bug report of the problem and the solution which I will not copy here. I have made the reproducer from the bug into a test which is also included.
webrev: http://cr.openjdk.java.net/~sla/8016304/webrev.00/ bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8016304 jbs: https://jbs.oracle.com/bugs/browse/JDK-8016304 Thanks, /Staffan
