Cleaner '_' placeholder support to partial

This is a refactored version of PR #1318 to make the code more obvious. All features are the same, and I've added another test to make sure that calling a copy of a partial doesn't affect later calls.