count_memory: Return early when visiting strings and lookahead >= 0. Similar fix to the one for the case where lookahead < 0, but not as general.