CoPAL: Corrective Planning of Robot Actions with Large Language Models