Fix stuck block detection

Only update time of when a block is received only when a block is received (rather than when any message is received).
It's the same indentation that was used before, the code's just moved.