I realized that we're supposed to float the boxes sideways, but not always to y=0, so that makes it logical to share the placement logic with other normal non-replaced blocks. This is still pretty buggy but we're getting closer. :^)