Fix handling of first newline and redundant literals