Fix UnboundedVariable errors introduced in 7b685b3ad