Fix moment().locale('ivalid-id')

Fixes (parts of) #1879