Re: allowed to switch to directories using wrong case
Has the path /opt/someprogram/somepath ever existed? If it did, WinSCP may have it in cache.
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.