Fix flawed JVM finalize behavior (WFLY-1149)