I tried that approach to start with, and it failed. It seems that even when there are no modules, an array of size 1, containing an empty object, still gets passed through. Most odd...