Merge pull request #4420 from pks-t/pks/strict-aliasing refcount: make refcounting conform to aliasing rules