The bug can be avoided by never letting the greatest revision of a charm be GCed (eg. deploying a dummy version of it before destroying and redeploying a service), and fixed after the fact by clearing /var/lib/juju/charm-get-cache on the state server.
For anyone trying to reproduce this, note that charm archival is apparently deterministic, so the local charm repo has to change at least slightly to trigger the bug.
The bug can be avoided by never letting the greatest revision of a charm be GCed (eg. deploying a dummy version of it before destroying and redeploying a service), and fixed after the fact by clearing /var/lib/ juju/charm- get-cache on the state server.
For anyone trying to reproduce this, note that charm archival is apparently deterministic, so the local charm repo has to change at least slightly to trigger the bug.