Fix exception merging to be compatible with Java 1.6.