Added comment saying why clearSources was needed.