Intermediate characteristicity is not transitive

Statement
An intermediately characteristic subgroup of an intermediately characteristic subgroup need not be intermediately characteristic.

Example of the dihedral group
Consider the particular example::dihedral group:D8, the dihedral group acting on a set of size four, i.e., the dihedral group with eight elements, given explicitly by the presentation:

$$\langle a,x \mid a^4 = x^2 = e, xax^{-1} = a^{-1} \rangle$$.

The cyclic subgroup generated by $$a$$ is a subgroup of order four, and since all the elements outside it have order two, it is a characteristic subgroup. Being maximal, it is intermediately characteristic. Within this, the cyclic subgroup of order two generated by $$a^2$$ is again intermediately characteristic.

However, the cyclic subgroup of order two generated by $$a^2$$ is not intermediately characteristic in the whole group: it is isomorphic to the two-element subgroup generated by $$x$$.