Be defensive about classloader in MessageSourceAutoConfiguration

Fixes gh-1960