Fix cases where 2D approximations cause elements to fall outside of the domain.