Minor validation fixes for generate_externs