Add several tests to check consistency of stack traces.
merge trunk