Add test verifying that $type will not be overriden if set by scope