Fix locale object getter, closes #1113