Fix nested language block

1. Set a new language block to its parent
2. Testcases for nested language blocks

@ke-yu