Fix a bug in recent files list with non-project file opens
BUG:412820
There was a bug in recent files list when the files were not open from within a project but from File/Open.
I also added a check to prevent reopening the same file twice (via File/Open), to align behavior on project mode.
Tested with command line/project/file open