title: Nested function not recognized as the name of a cmdlet
body: <p>Below is the file (highly simplified versions) of interest:</p>
  
  <p><code>main-func.psm1</code>:</p>
  
  <pre><code>function main-func
  {
      [CmdletBinding()]
      param 
      ()
  
      Write-Verbose "In main-func"
      main-workflow
  }
  
  workflow main-workflow
  {
      [CmdletBinding()]
      param 
      ()
  
      Write-Verbose "In main-workflow"
      func-outer
  }
  
  function func-outer
  {
      [CmdletBinding()]
      param
      ()
  
      Write-Verbose "In func-outer"
      func-inner
  }
  
  function func-inner
  {
      [CmdletBinding()]
      param
      ()
  
      Write-Verbose "In func-inner"
  }
  
  Export-ModuleMember -function main-func
  </code></pre>
  
  <p>Now I open Windows Powershell and execute the following commands:</p>
  
  <pre><code>&gt; Import-Module .\main-func.psm1
  &gt; main-func -Verbose
  </code></pre>
  
  <p>The output that I get is as below:</p>
  
  <pre><code>VERBOSE: In main-func
  VERBOSE: [localhost]:In main-workflow
  VERBOSE: [localhost]:In func-outer
  The term 'func-inner' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
  path was included, verify that the path is correct and try again.
      + CategoryInfo          : ObjectNotFound: (func-inner:String) [func-outer], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException,func-outer
      + PSComputerName        : [localhost]
  </code></pre>
  
  <p>But if I replace <code>main-workflow</code> in function <code>main-func</code> with <code>func-outer</code>, then it works.</p>
  
  <p>I'm pretty new to Powershell and Workflows and using workflows is a requirement. Can somebody please explain what's wrong here?</p>