A test case that should work but does not

What I found so far it looks like the inner signature is removed before the digest value is calculated, which obviously throw everything off track.