Fix infinite loop with asTraversal and add extra compiler arguments