Previously, optional properties of a directive/component would be wrongly mapped and thus ignored. Closes #10181