  The capture of trapped ultracold neutrons (UCNs) by closed hydrogenous
impurities within a solid coating of the trap is discussed as a possible cause
of observed anomalously large losses of UCNs in solid material UCN traps. Then
significant losses of UCNs arise only if resonances occur in the UCN-impurity
scattering amplitude. For a large size impurity, higher partial waves in the
UCN-impurity interaction are important, and they are taken into account in the
present paper. The method of the calculation is applicable to irregular shape
impurities as well. A small distortion of an impurity shape, if it splits the
resonance, can increase the UCN losses by a few times. UCN losses in the
beryllium trap are calculated assuming they are due to the UCN capture by ice
spherical impurities within the coating of the trap walls. Both s- and p-wave
resonances contribute significantly to the UCN losses considered. As an
example, observed anomalous large UCN losses are achieved if the average radius
of the impurity is about 600 Angstroms and the impurity density is about
3*10^{14}/cm^3. A distortion of the spherical shape of the impurity could
increase the UCN losses and therefore decrease the impurity density.
