Fixed regression causing JS errors after updating an axis title when useHTML is set. Closes #2402.