I found that in 17w45b you can use /op and /deop even in singleplayer and I tried to deop meself.
After I deoped meslef, I could still use commands, and when I try to /op meself back it said I already oped, but until I died every command block I tried to place was a ghost block (Impulse command block).
Linked issues
Comments

Duplicates MC-121636