MZ-Tools Articles Series: BUG: DTE.ActiveDocument.ActiveWindow does not return the active document window if toolwindow active

My first small article this year is to document this bug of Visual Studio 2005, 2008, 2010 and 2012:

BUG: DTE.ActiveDocument.ActiveWindow does not return the active document window if toolwindow active
http://www.mztools.com/articles/2013/MZ2013001.aspx

Which I have just reported to Microsoft Connect:

Document.ActiveWindow does not return always the active window
https://connect.microsoft.com/VisualStudio/feedback/details/781522/document-activewindow-does-not-return-always-the-active-window

and that is a variation of a bug that I reported for VS.NET 2002/2003 and that I thought it was definitely fixed in VS 2005 (the relevant factor is that it still fails if a toolwindow is active):

BUG: Document.ActiveWindow does not return always the active window in Visual Studio .NET 2002/2003
http://www.mztools.com/articles/2004/MZ2004013.aspx