fix constness tracking for shared pointer

(issue #3)