Fix StatusBox to account for template recording rules.

Cherry-pick part of SHA1:22c5dbff from master.