Isn't this being called multiple times? Looks like a candidate for a ||=