It turned out that patch d0e38d59 wasn't accompanied w/ a test. Add proper check. (cherry picked from commit c80e9416)