Add workaround for using this pointer in returns on older compilers like gcc 4.6
Add a check for this mismatch in returns macro