Speed up the new state distribution query on the species page. (#503)