Make sure that ambiguous val() selection works correctly.