shared_ptr upcast fixes for D

Same changes that were applied to Java/C# in ab7f526805b86726a3c23c853e0ab19458f2c7d9
1 file changed