Added an anti-hoisting check to the const test

I was previously hesitant to include this, but since most platforms'
const support is invalidated already by their lack of error-throwing,
adding this check doesn't disturb the results at all.