Ternary operators don't work the way we think

Change-Id: I5a7e7d2dedd2c2c47612ed8868450fc21cfeba3c
diff --git a/vars/functions.groovy b/vars/functions.groovy
index 4e4b333..4cf4a6f 100644
--- a/vars/functions.groovy
+++ b/vars/functions.groovy
@@ -60,7 +60,12 @@
         String stamp = date.format("yyyyMMdd-HHmmss")
 
         def packages = findFiles(glob: "out/**/${packageName}*.deb")
-        def sources  = includeSources ? findFiles(glob: "out/**/${packageName}*.dsc") : []
+        def sources  = []
+
+        if (includeSources == true) {
+            sources = findFiles(glob: "out/**/${packageName}*.dsc")
+        }
+        
         def filenames = (packages + sources).each{entry -> entry.path}
 
         if (filenames.size() == 0) {