Fixed incorrect final flag
Test case for GROOVY-5754