That was not the impression I received from her text messages of that evening. My impression is that she was "dreading" loneliness and wanted company. Hence the conclusion that it is not implausible for her to have invited him in. But I agree with you that he appeared to contradict himself under cross-examination on the subject, giving the impression that he had approached her front door spontaneously.
She was dreading being left on her own for the first time, apparently. (Dreading is a strong word.) That's likely to be either because she was afraid of being on her own in the flat or she hated being apart from Greg or she was a person who in any case didn't like being alone. If she wanted to go to her best friend in Swansea, that could suggest that she didn't want to be alone in the flat because she was afraid. It certainly wouldn't imply that she felt safe in her flat. Texting her friends and wanting their company because she was afraid of being alone would be understandable. It doesn't follow that she would want the company of someone she didn't know. Her friends could probably shed light on how she would feel about that. It is possible though, that her concern or even fear of being alone could have made her susceptible to a caller at the door whom she took to be a neighbour and hence assumed to be a normal sort of safe neighbourly person, rather than a threat or an opportunist or predator. Again her closest friends could probably tell us more about why she was dreading being on her own and how she was likely to react at the door to a caller or a neighbour when on her own.