Jon's earlier patch expanded our existing implicit move semantics support to allow other types, but this testcase demonstrates a hole in that support: it didn't affect function template argument deduction. Rather than try to tweak deduction as well as reference binding, this patch actually does overload resolution twice, as specified in the standard. Tested x86_64-pc-linux-gnu, applying to trunk.