Partial fix for Issue 10666 - Appender does not work with a RefCounted type

Essentially this is neigher dmd nor phobos regression, but recent Appender change in 2.064a should not raise "cannot build closure" error.
Merge pull request #2548 from 9rnsr/fix10666

Partial fix for Issue 10666 - Appender does not work with a RefCounted type