Added threadlocal context to dom parser too