emit a warning if an object instance has alpha transparency on one side but not on the other.

several refactorings and code movements.