Merge pull request #201 from btf064/master

Library template nesting fixes