Backport shaper.inc commit from master to RELENG_2_1

Requested by ermal