Fix bug where cached matrix caused clustering different networks to
break.