Merge bugfix into trunk: Fix intialisation of static variable. Only relevant when compiling in debug mode