Fix validation of local id references