Fix parent instance sharing bug with Class.extend