Fix #232: "smart" js.Dynamic.literal

Superseeds #264