Fix nested language block

1. Set a new language block to its parent
2. Testcases for nested language blocks
Merge pull request #2024 from junmendoza/NestedLanguage

Fix nested language block