The composition $H(z)=f(\Phi(z))$ is studied,where $f$ is an entire function of a single complex variable and $\Phi$ is an analytic function in the $n$-dimensional unit ball with a vanished gradient.We found conditions by the function $\Phi$ providing boundedness of the $\mathbf{L}$-index in joint variables for the function $H$, if the function $f$ has bounded $l$-index for some positive continuous function $l$and $\mathbf{L}(z)= l(\Phi(z))(\max\{1,|\Phi_{z_1}'(z)|\},\ldots, \max\{1,|\Phi_{z_n}'(z)|\}),$ $z\in\mathbb{B}^n.$ Such a constructed function $\mathbf{L}$ allows us to consider a function $\Phi$ with a nonempty zero set for its gradient.The obtained results complement earlier published results with $\mathop{grad}\Phi(z)=(\frac{\partial \Phi(z)}{\partial z_1}, \ldots, \frac{\partial \Phi(z)}{\partial z_j},\ldots,\frac{\partial \Phi(z)}{\partial z_n})\ne \mathbf{0}.$Also, we study a more general composition $H(\mathbf{w})=G(\mathbf{\Phi}(\mathbf{w}))$, where$G: \mathbb{C}^n\to \mathbb{C}$ is an entire function of the bounded $\mathbf{L}$-index in joint variables, $\mathbf{\Phi}: \mathbb{B}^m\to \mathbb{C}^n$ is a vector-valued analytic function, and$\mathbf{L}: \mathbb{C}^n\to\mathbb{R}^n_+$ is a continuous function. If the $\mathbf{L}$-index of the function $G$ equals zero, then we construct a function $\widetilde{\mathbf{L}}: \mathbb{B}^m\to\mathbb{R}^m_+$ such that the function $H$ has bounded $\widetilde{\mathbf{L}}$-index in the joint variables $w_1,$ $\ldots,$ $w_m$. These results are also new in one-dimensional case, i.e. for functions analytic in the unit disc.