Tests: Update the WindowModel to be more resilient to multiple instantiation of the same WindowModel.

Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>