Localized deformation modes and non-Schmid effects in crystalline solids. Part I. Critical conditions of localization