distcheck: Fix master and slave checks