xcursor: prevent recursive inherit loops
Related to wayland/wayland#317 (closed). Patch adapted from wayland/wayland!376 (merged).
Reproduction case and test results are available below. In short: the reproduction is trivial and the changeset completely removes the problem from existence.
Edited by Chloé Vulquin