Note: this has not been thoroughly tested, but it seems to work.
The rail offset no longer seems to be needed. While the code should be reworked to remove it, the changes I made to control.lua were:
line 82: local start_x = math.floor(pos.x) - math.floor(width / 2.0)
line 83: local start_y = math.floor(pos.y) - math.floor(height / 2.0)
Note the removal of the rail offset and the switch from math.ceil to math.floor.
Offshore pumps still act a bit weird, creating a 2 by 2 tile, but they place properly.