T3165: op-mode: prevent override of populated node.def file with empty content
This is an extension to commit b4fdcebe ("T3165: prevent override of populated
node.def file with empty content") which implemented the same thing for the
configuration mode commands.
(cherry picked from commit 17b5ac143c9128ac3e187d8d8167dd8fe6cbca7d)