Take into account the modes for the binpack plugin
Fix issue reported by Dave.