NXP-14549: refactor and clean a bit the cmd stack, skip duplicate indexing in async and recurse, fixing NXP-14547 by preventing to skip indexing command on updated document