Another unit test for conditionals and fix for regexp inside if