T8242 now passes on Windows

Signed-off-by: Austin Seipp <austin@well-typed.com>
Fix dangling pointer reference in T8242

Signed-off-by: Austin Seipp <austin@well-typed.com>
Test Trac #3333

Signed-off-by: Austin Seipp <austin@well-typed.com>