PRD-4898 - Fixing the elusive class-cast-exception that seems to be happ...

...en only on selected systems.