Fixed #6518 and a related Formatter.js bug.