Fixed less compiler error handling

Fixes #1541.

It seems that the errors passed to the callback that takes the Less AST
can be more than just Objects.

Added unit tests so that we'll detect this in future.