Added a second loop to composite that checks for functions acting as continuations.