Bundle: Respect RunOnBuild setting (#1259)

Fixed #1259.