(e) The judicial doctrine of substantial compliance shall not apply under this section where the person who engaged in the business or acted in the capacity of a contractor has never been a duly licensed contractor in this state. However, notwithstanding subdivision (b) of Section 143, the court may determine that there has been substantial compliance with licensure requirements under this section if it is shown at an evidentiary hearing that the person who engaged in the business or acted in the capacity of a contractor - (1) had been duly licensed as a contractor in this state prior to the performance of the act or contract, - (2) acted reasonably and in good faith to maintain proper licensure, and - (3) acted promptly and in good faith to remedy the failure to comply with the licensure requirements upon learning of the failure.