Avoid undef downcast in base class ctor

Change-Id: I71eecfdc657b153f9289e8e9af52fba9ed22d3a8