Fixed compiler entities body logic.
Added tests for this bug.

Signed-off-by: SeynovAM <sejnovalexey@gmail.com>