Consider the cubic function given by the equation:
$$f(x) = ax^3 + bx^2 + cx + d$$
where $a$, $b$, $c$, and $d$ are constants. The function has a local maximum at $x = -1$ and a local minimum at $x = 2$. Additionally, it passes through the point $(0, -4)$. Find the value of $a$ given that the function can be expressed as:
$$f(x) = a(x + 1)^2(x - 2) + k$$
where $k$ is a constant.