Fix crasher in overriding undefined function by inherit.

Fix #221.