Calling Keg#unlink on "#{f.rack}/#{f.version}" will perform the unlink
relative to the _new_ keg, rather than the keg we are upgrading from.
Fix this by resolving the linked_keg entry and unlinking relative to it.
Fixes#10296.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>