I have finally figured out what was going on. The undesired thin white diagonal lines on the floor appeared because I was using glEnable(GL_POLYGON_SMOOTH);, which is apparently a bad practice.
The problem regarding the unexpected result when blending textures was caused due to a strange behaviour of a discard; operation in the shader. More details about it in this other questionthis other question.