Group library dependencies into the library blocks where they are required.