Floated elements overflow container incorrectly

When using relatively positioned floating elements inside a container, which has an overflow other than visible, the elements behave as if the container has overflow: visible. This occurs in (at least) Internet explorer 6 and 7.