The immediate cause under JDK16+ is not always InaccessibleObjectException meaning the fallback logic to copy properties does not kick in. Additional logic is needed to harden the detection of the InaccessibleObjectException to ensure it is catered for in the fallback logic. Co-authored-by: Adrian Hjertstedt <adrian@adrianhj.com>