Fixes #12447 (closed).
This makes the Less code more verbose, but it's more specific and solves the problem we have today as of v3.1. This fix also trumps #12489 and fixes #12596 (closed) (dupe of #12447 (closed)).
See the change in action: http://jsbin.com/lowo/2/.