When you have nested modules, the BoM on the top level project doesn't contain all the parts. To reproduce:
  • Create a Module (module A)
  • Add Module A into a project (Project 1)
  • Convert project 1 into a module (Module B)
  • Add Module B into a new project (Project 2)
In that case project 2's BoM export will not work.