Fix bounds checking on cubic beziers to match specification.