Mitigate the impact of require list expansion on code size by filtering expanded layer dependencies

Require list expansion is an effective technique for reducing HTTP requests caused by dependency discovery as modules are loaded, but it has the downside of increasing the size of the code somewhat.  The aggregator already addresses this by filtering the expanded require list using the expanded dependencies of the containing modules, plus any scoped require lists.  This change further reduces the impact of require list expansion on code size by filtering the expanded require list using the expanded dependencies of all the modules in the layer that the module belongs to.