builddevice: fix random cherry-pick malfunction