javascript: prevent name possible name overlap