another followup to recent rlayer cleanup (rB2c196de56bbb,
looks like rlayer cleanup needs another fixup (blush... -- hope I didnt open a can of worms here...)
I committed this and some other fixes now. I should have reviewed the previous patches better.
@Brecht Van Lommel (brecht): thx! (not your fault --> it is me who should have done more testing!)