It is worth noting that awareness of this issue is why the FSF explicitly requires copyright assignment and a disclaimer of any work-for-hire ownership claims by the programmer's employer. Because employees often do not realize that their employer could have a copyright claim, and the FSF is very careful. See https://www.gnu.org/licenses/why-assign.en.html for verification.
It is worth noting that awareness of this issue is why the FSF explicitly requires copyright assignment and a disclaimer of any work-for-hire ownership claims by the programmer's employer. Because employees often do not realize that their employer could have a copyright claim, and the FSF is very careful. See https://www.gnu.org/licenses/why-assign.en.html for verification.