Fix prediction of windows and bars.

The style rewrite prevented direct access to prefixed styles,
which caused prediction not to work. With this change, we
handle the prediction in cython, which has access to
prefixed and unprefixed styles.