Feature emval improvements

As discussed in issue #2925, here is the proposed patch for discussed improvements.

Let's shoot remarks ;-)
Does the refcount even matter on these special values?