It would be ideal I believe if you Odin flashed the latest stock ROM and updated from there. That is typically how I do it with all of my Galaxy devices (2 GS2s and a GS3) but I do not own an S4. I doubt it is too much different. I think Kies can detect either an unlocked bootloader or custom recovery and will not let you update otherwise.
Sent from my SAMSUNG-SGH-I747 using Tapatalk 4