Fix #18062 where with build make the inheritance object instead of paren...

Fix #18062