Found a bug with a failed test case

The current implementation does inheritance backwards