Various fixes for tracetest-covered issues