IDE: prevent crash when pressing F5 while source editor is closed.

git-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@46464 4005530d-fff6-0310-9dd1-cebe43e6787f
Designer: a temporary exception to search a bug where index for FUndoList goes negative with non-visible components.

git-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@46465 4005530d-fff6-0310-9dd1-cebe43e6787f
Designer: an attempt to fix a Undo-bug with non-visible components. Now the index for FUndoList goes over. :(

git-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@46466 4005530d-fff6-0310-9dd1-cebe43e6787f