Fixed Oracle GIS failures introduced by e9103402c0; refs #18757.

alternate approach: https://github.com/django/django/pull/3237