Fix classes that extends themselves. (Closes #93)