core: MachineIndex valid test is better