Fix issue in runtime picklers with singleton objects

This addition should be discussed, because it is currently not uniform with `genPickler`.