Check user profile's plugin-repositories when looking for templates.

Fixes #1510.
Merge remote-tracking branch 'upstream/master'