Revert "Small template optimization"

This reverts commit d16f5255d9ca09b0985e895f153ceb7786c7141a.