Fix for bug 474411: Two loops can share the same lastBlock so the