Guard against declaring fully numeric hex values as uppercase,

add new tests for case conversion + above fix