Updated patch to work with current trunk.