Fix solution loading issues

Fixes bug #24288 - 'Load previous solution on startup' option breaks loading
projects from the command line