Fixes bug involving edge case where rotation, scaling and translation are combined.