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