Some boolean magic in mirror.dm