Fix :class inheritance when you have references
Merge pull request #47 from mcamou/#40

Fix :class inheritance when you have references