Refactor filter insanity checks to ensure that a node and its filters are kept together.