Follow up on regressions introduced by initial fix for redmine 6553

mostly whitespace, new is the has_valid_entries test