Should I simultaneously apply for multiple jobs in different ranks at the same university? Say this year the university A advertises one postdoc and one tenure-track position. If I prefer the tenure track position, but am not sure that I can get it, what should I choose between the following two options?

Option A: Apply for both postdoc and tenure-track positions.

Option B: Apply for tenure-track position only, hoping that even if I don't get it, the university will consider offering me the postdoc position. 

I thought that Option A is safer, but some of my friends say the opposite. They think that if you apply for both positions, then even if you are good for the tenure-track position, the university will tend to offer you only the postdoc position, the lowest rank that you asked for.

Do you have any insight on this?

For more information: the job market I am referring to is the US'. 

What if we have other situations: postdoc/lecturer, lecturer/tenure-track, or postdoc/lecturer/tenure-track?
My experience is in mathematics in the US. My personal experience is that people will not read anything especially deep into applying for both jobs.  Everybody understands that the market is tough, and basically expects everybody to apply to every opening.  I've seen instances where a person was considered both for a postdoc and TT position at the same university, and this was not seen as an issue at all (there was much more strategizing around the question of whether they would come for a postdoc).  

In the vast majority of cases (without, say, a severe geographical constraint), I think if you consider TT and postdoc at the same place as both reasonable options for you and plausible possibilities, you're probably kidding yourself on one score or another. Generally if you'd even be seriously looked at for a TT job at University X, then when the postdoc committee looks at your file, they'll say "We could hire this person for a TT job.  There's no way that a postdoc at University X is the best job they'll get." and they probably won't offer you the position.    But unless you feel confident about which way it is, I don't see any problem with applying to both.

EDIT: One thing I'll add, which is mathematics specific: if you're applying MathJobs, the visual difference between applications for the different jobs is negligible.  There is a column where you can see what positions the applicant applied for, but it's not very noticeable.  So, it's quite possible the committee for one job won't even notice you applied for the other (I have seen this happen).