Hi Rick,
I sent you an explanation by email, but I thought I would put it here as well, maybe it will be useful for someone in the future.
My Ubuntu runs in VM on Windows, and my script operates on folders that are shared with Windows. File operations on such folders are apparently handled by Windows (even if requested by Linux), and thus are case-insensitive. The script had wrong case in a file name, which broke it when running on native Linux on HPC, but not in VM in folders shared with Windows.
There are ways to make these file operations case-sensitive in Windows (and, consequently, they become case-sensitive for Linux when reaching to the folders from VM). Of course, I am going to do it from now on...