Add test for within_frame with frame index.

See #185.