Move the handling of query leader message after heartbeat check.

Found it by running jepsen test.