render mask "layers"

Could you attach part of the problematic scene file that reproduces the issue?