Make callbacks recursive when needed on documents