transform.py: bugfix bracket replacement