Fix for double free in KdTreeFLANN after copy operation #335.