Yes, ```needsClosure``` is the same check as used in the backend, so this should really 100% match the backend behavior. Here's the test for that:
https://github.com/D-Programming-Language/dmd/pull/1886/files#diff-970b8289539ead3e97f260372e52a0f2R85