When building the nightly images, some patches fail because they come from the master branch. To address this, we apply certain patches only if we are not in nightly mode.