PRD-4898 - Invalid boxing caused class-cast exception
(cherry picked from commit 1567e48)
Merge pull request #333 from tmorgner/PRD-4898-5.0

PRD-4898 - Invalid boxing caused class-cast exception