Fix missing layer check on sprite