Escape identifiers in Scala output when needed.