I'm afraid the attempted fix for this (commit e8f7d12c01300fe703c6439db05ebca9cabfc580) may have broken other code that relies on getPath() returning a copy.  Couldn't this code be reworked to work with a copy, or if that is not possible, get a method in PathFinder to manipulate the actual path?