Analysis of and workarounds for element reversal for a finite element-based algorithm for warping triangular and tetrahedral meshes