Fixed invisible bug in test 8.

The bug wasn't visible because a bug the compiler masked it.
(type check on while wasn't correctly done)