Move frame length constraint to where it is used. Remove method only used in tests.
Merge pull request #1057 from square/adrian.max-frame

Move frame length constraint to where it is used.