If anything, put the past perfect with the thinking of Robert. When she was at her grandma's house, she had realized that Robert was frequently on her mind. What's not clear is whether her thankfulness was at the time she was with Grandma, or whether she feels it now.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.