If a type is derived from a derived type then calculate size appropriately.