This code ($FirstName$="John") should compile error free.
This is not the case and any compiler error depending on the content behind the = can occur.
This is a product defect (34500).
This will be fixed in a future release of the product. If you require this immediately corrected, please contact support for a hotfix referencing the defect ID 34500.