XS: Fix broken `RemoveHandler` implementation in the Path extension

Minor fix. Current code will never remove event handlers because because lambdas aren't comparable.