Fix #785: Cache in scaled scaled canvas was scaled twice.

Note: the fix is baed on pull request #762.