Fixes ZEN-12565

Ported https://dev.zenoss.com/tracint/changeset/81679