fix bug that added subvalid keys to the wrong list