Tests that AOT code is used if available after tracing has stopped.