Fixed bug where returning undefined would remove the selection when rules are applied to the scope level of the template