build: we need this isinstance() check for distcheck