Fix tabs on layout form so they filter correctly.

From #4791.