Fixed #187

If the header supplies illegal layout params we must fix them. Match
parent becomes wrap content. Because the standard layout params of a
framelayout are match parent this bug occurred.