Do "the dog" and "it" point to the same thing in the following sentence?

It was a summer afternoon, and the dog was sitting in the middle of the lawn. After a while, it got up and moved to a spot under the tree, because *it* was cooler.
no