fixes #12617 , legal identifier not required but still validate