direction check now takes into account feature groups inverse when
determining the direction of a feature to compare against the error
propagation direction.
Fixed class cast issue. Wass checking for src instanceof but then
casting dst, and vice versa.