fix Issue 11946 - "need 'this' to access member" when passing field to template parameter