Minor bug fix and logic cleanup for calling discretize_geom().