If $oldRules is empty the function setRules should return []. See https://github.com/joomla/joomla-cms/blob/master/libraries/joomla/table/table.php#L372