Fix for Bug report #2461

This fixes the bug reported with "Bug report #2461  -  Accessing
settings throws an Exception in 4.0-dev"