Make the reference counter depend on the realm path