Change transformation order to prevent bugs with shorthand object syntax

Fix for #1120