Fix several issues in label inference for Gecko content