Add layers dependency to util crate. Fixes #3783.