Magical constraints (or How to turn bugs into features)