Fixed issue #1996 about supporting inheritance on edge traversing