format: fix a thinko: multi-acquiring of single object
Solution: use a wrapper, sufficient in the current usecases (i.e., just
delegating __eq__ and __hash__ methods), that holds the reference to the
original.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>