I tried @Pau's workaround, and it didn't work as the files now seem to be JSON. I had to do the following to get this working with a more recent version of Homebrew:
find "$(brew --prefix)/Caskroom/"*'/.metadata' -type f -name '*.json' -exec jq 'del(.depends_on)' {} \; -exec sh -c 'jq "del(.depends_on)" "$1" > "$1.tmp" && mv "$1.tmp" "$1"' _ {} \;