Strange...
I've just found a special function in boost for do casts of this sort: [`static_pointer_cast`](http://www.boost.org/doc/libs/1_55_0/libs/smart_ptr/shared_ptr.htm#static_pointer_cast). Perhaps we could use it in this case.