What do you have Custom Setting f9 No Memory Card set to? I bet that you have it set to Enable Release which will allow you to capture an image and display it in the rear LCD when there is no memory card in the camera and I suspect when the memory card is full, though the image will not be recorded.
Try setting f9 to Release Locked. That should solve the problem.
If the last images were not recorded on the card, the camera is functioning normally. If the camera is overwriting files there is something wrong that will require service. Good luck and Enjoy your Nikons!