Fix incorrect behavior when using content_tag with block.

Add test cases for #1430
Merge pull request #1431 from namusyaka/fix-content_tag

Fix incorrect behavior when using content_tag with block.