Fix sub views substitution
Subsitution cleanup && test enhancement
Fix typo
Merge pull request #322 from nlegoff/fix_1111

[3.7] Fix #1111 sub views substitution is broken