Yes, tested and confirmed that the upper-case query fixes the problem when using a SQL Server database with a case-sensitive collation.
I have also created a small pull-request here so that you can see a quick test case that I have put together.