In general the JLINK tools will not do a mass erase unless the MCU is secure (The FSEC bits 1 and 0 are not equal to 'b10). Some of the tools have incorrectly mis-identified the MCU as secure when the FSEC was set to 0xEE, but MCUXpresso and IAR have been fixed. I have not run any test with the JFLASH tool so I cannot attest to it's correct operation.
If you erase the flash config (0x400 - 0x40f) area of the MCU and perform a reset then the part will be secured since the FSEC is set to 0xFF. So, you need to complete the re-programming of the flash with the new project, which correctly sets the flash config space after a region erase and before the next reset. If you do end up securing the part without a backdoor key set, then the only way to re-use the MCU for anything is to mass erase it. That is just how the Kinetis security is designed. This erases the KMS library and the part is no longer able to support KMS.
You should replace the MCU with another KMS enabled MCU.
Within the KMS reference project is the file flash_config.c
If you want to prevent future mass erase accidents remove the comments brackets around the code like below. Recompile, download with the debugger, reset the MCU and run to application. If you want to check out what this is doing for you, you can read about the effects of the MEEN bits in the RM. Basically these setting stop any of the flash tools from doing a mass erase that will remove the KMS library.
#define KMS_MASS_ERASE_DISABLED
Using the memory tool, a read of the flash config space with the IDE shows that the FPROT bits have been set and the FSEC default is set to 0xEE - meaning not secure, but mass erase disabled.
0x00000400 FFFFFFFF FFFFFFFF 7FFFFFFF ÿÿÿÿÿÿÿÿÿÿÿ.
0x0000040C FFFFFFEE îÿÿÿ