     cacheDeps = []
 
     for i in deps
-      if cache[i]
+      # Need to check for hasOwnProperty
+      # Checking for cache[i] is not strict enough
+      # because a module could have undefined, null, 0 or an empty string
+      # as its export value
+      if cache.hasOwnProperty(i)
         cacheDeps.push cache[i]
       else
-        unless isCommonJS
-          # Create script element
-          scriptElem = root.document.createElement 'script'
-          scriptElem.async = true
-
+        if root.molo.scriptLoader
           if isJavaScriptFile(root.molo.paths[name])
             # If the path is complete (e.g. 'js/lib/mymodule.js') take that as a path
             scriptPath = root.molo.paths[name]

# ES 5 compability functions
Object.keys or= (o) -> name for own name of o
Array.isArray or= (a) -> a.push is Array.prototype.push and a.length?

    return undefined if skipFunc

    # Execute factory function and store it in cache
    
    # Special case: Factory is an object and has no dependencies ()
    if typeof define is 'object' and deps.length is 0
      cache[name] = define
    else
      cache[name] = define.apply context, cacheDeps

    # Check queue
    queueList = Object.keys(queue)
