Introduces rebind keyword for some properties to enable dynamic rebinding

See #2100.

I had to do a rebase. This fixes the issues mentioned there.