Move escaped newline check to proper location