Can you move the `w_space+ %{ tm = p }` part above the rest of the rule? Otherwise, LGTM.