univalue_read: make check more strict, fix test