Use flag to find when implicational closure is done

Signed-off-by: Daniel Borchmann <daniel.borchmann@mailbox.tu-dresden.de>