Fixed strange bug with vertical-to-slope rails

Signed-off-by: Irmo van den Berge <bergerkiller@gmail.com>